Skip to content

drivers/radio/nrf24l01: Optimized status reading. #955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

marcsello
Copy link
Contributor

The value of the STATUS register is always transmitted by the chip when reading any command. So a R_REGISTER command and the turnaround time can be spared by issuing a NOP command instead.

This implementation suggested by the datasheet.

This operation is compatible with both nRF24L01 and nRF24L01+.


In my testing, this reduced the STATUS read time from 41 μs to 27 μs. This allows for quicker polling, and thus more responsive operation.

Old behavior:

Screenshot_2024-12-30_16-08-35

New behavior:

Screenshot_2024-12-30_16-06-31

Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

marcsello and others added 2 commits April 10, 2025 22:31
The value of the STATUS register is always transmitted by the chip when
reading any command.  So a R_REGISTER command and the turnaround time can
be spared by issuing a NOP command instead.

This implementation suggested by the datasheet.

This operation is compatible with both nRF24L01 and nRF24L01+.

Signed-off-by: Marcell Pünkösd <[email protected]>
Due to the previous three commits.

Signed-off-by: Damien George <[email protected]>
@dpgeorge dpgeorge force-pushed the nrf24l10-quick-status-read branch from 7e10dc4 to 221a877 Compare April 10, 2025 12:34
@dpgeorge
Copy link
Member

I also bumped the version here.

@dpgeorge dpgeorge merged commit 221a877 into micropython:master Apr 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants